package cn.shujuhai.common.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @TableName department
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "department")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Department extends BaseDomain {
    /**
     *
     */
    @TableId(value = "department_id", type = IdType.AUTO)
    private Long departmentId;

    /**
     * 部门名称
     */
    @TableField(value = "department_name")
    private String departmentName;

    /**
     * 描述
     */
    @TableField(value = "description")
    private String description;
    @TableField(value = "parent_id")
    private Long parentId;
    @TableField(exist = false)
    private List<Department> children;
}